package org.example.viteVantDemo.util;

import lombok.extern.slf4j.Slf4j;
import org.example.viteVantDemo.security.VantUser;
import org.example.viteVantDemo.security.VantUserDetails;
import org.springframework.security.core.Authentication;
@Slf4j
public class VantUserUtils {

    public static VantUser getVantUser(Authentication authentication) {
        VantUserDetails vantUserDetails = (VantUserDetails)authentication.getPrincipal();
        return vantUserDetails.getSysUser();
    }
}
